package com.xxx.service_hi.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * created by CaiBaoHong at 2018/9/13 22:45<br>
 */
@RestController
public class HiController {

    @Value("${server.port}")
    private Integer port;

    @GetMapping("/hi")
    public String home(@RequestParam(value = "name", defaultValue = "CaiBaoHong")String name){
        return "Hi, "+name+"! I am HiService from port: "+port;
    }

}
